const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const {add_tab_schema, del_tab_schema, update_tab_schema} = require('../schema/tab')

const tabsHandler = require('../router_handler/tabHandler')

// 增
router.post('/addTab', expressJoi(add_tab_schema), tabsHandler.addTab)
// 删
router.post('/delTab/:id', expressJoi(del_tab_schema), tabsHandler.delTab)
// 改
router.post('/updateTab', expressJoi(update_tab_schema), tabsHandler.updateTab)
// 查
router.get('/getTabAll', tabsHandler.getTabAll)

module.exports = router

